home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH13 / 13-1-2.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-21  |  3.7 KB  |  134 lines

  1. VERSION 5.00
  2. Begin VB.Form frm3_1_2 
  3.    Caption         =   "Semester Grade"
  4.    ClientHeight    =   2532
  5.    ClientLeft      =   60
  6.    ClientTop       =   348
  7.    ClientWidth     =   4704
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   2532
  10.    ScaleWidth      =   4704
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.PictureBox picGrade 
  13.       Height          =   495
  14.       Left            =   120
  15.       ScaleHeight     =   444
  16.       ScaleWidth      =   4404
  17.       TabIndex        =   11
  18.       Top             =   1800
  19.       Width           =   4452
  20.    End
  21.    Begin VB.CommandButton cmdQuit 
  22.       Caption         =   "&Quit"
  23.       Height          =   495
  24.       Left            =   3480
  25.       TabIndex        =   10
  26.       Top             =   1200
  27.       Width           =   975
  28.    End
  29.    Begin VB.CommandButton cmdDisplay 
  30.       Caption         =   "&Display Grade"
  31.       Height          =   495
  32.       Left            =   1920
  33.       TabIndex        =   9
  34.       Top             =   1200
  35.       Width           =   1335
  36.    End
  37.    Begin VB.TextBox txtFinal 
  38.       Height          =   285
  39.       Left            =   4080
  40.       TabIndex        =   6
  41.       Top             =   720
  42.       Width           =   375
  43.    End
  44.    Begin VB.TextBox txtMidterm 
  45.       Height          =   285
  46.       Left            =   2760
  47.       TabIndex        =   5
  48.       Top             =   720
  49.       Width           =   492
  50.    End
  51.    Begin VB.TextBox txtSSN 
  52.       Height          =   285
  53.       Left            =   600
  54.       TabIndex        =   3
  55.       Top             =   720
  56.       Width           =   1212
  57.    End
  58.    Begin VB.TextBox txtName 
  59.       Height          =   285
  60.       Left            =   720
  61.       TabIndex        =   1
  62.       Top             =   120
  63.       Width           =   3612
  64.    End
  65.    Begin VB.CommandButton cmdEnter 
  66.       Caption         =   "&Enter Information"
  67.       Height          =   495
  68.       Left            =   240
  69.       TabIndex        =   0
  70.       Top             =   1200
  71.       Width           =   1455
  72.    End
  73.    Begin VB.Label lblFinal 
  74.       Caption         =   "Final"
  75.       Height          =   252
  76.       Left            =   3480
  77.       TabIndex        =   8
  78.       Top             =   720
  79.       Width           =   372
  80.    End
  81.    Begin VB.Label lblMidterm 
  82.       Caption         =   "Midterm"
  83.       Height          =   252
  84.       Left            =   2040
  85.       TabIndex        =   7
  86.       Top             =   720
  87.       Width           =   612
  88.    End
  89.    Begin VB.Label lblSSN 
  90.       Caption         =   "SSN"
  91.       Height          =   252
  92.       Left            =   120
  93.       TabIndex        =   4
  94.       Top             =   720
  95.       Width           =   492
  96.    End
  97.    Begin VB.Label lblName 
  98.       Caption         =   "Name"
  99.       Height          =   255
  100.       Left            =   120
  101.       TabIndex        =   2
  102.       Top             =   120
  103.       Width           =   495
  104.    End
  105. Attribute VB_Name = "frm3_1_2"
  106. Attribute VB_GlobalNameSpace = False
  107. Attribute VB_Creatable = False
  108. Attribute VB_PredeclaredId = True
  109. Attribute VB_Exposed = False
  110. Private pupil As CPFStudent
  111. Private Sub cmdEnter_Click()
  112.   Set pupil = New CPFStudent
  113.   'Read the Values stored in the Text boxes
  114.   pupil.Name = txtName
  115.   pupil.SocSecNum = txtSSN
  116.   pupil.midGrade = Val(txtMidterm)
  117.   pupil.finGrade = Val(txtFinal)
  118.   'Clear Text Boxes
  119.   txtName.Text = ""
  120.   txtSSN.Text = ""
  121.   txtMidterm.Text = ""
  122.   txtFinal.Text = ""
  123.   picGrade.Cls
  124.   picGrade.Print "Student recorded."
  125. End Sub
  126. Private Sub cmdDisplay_Click()
  127.   picGrade.Cls
  128.   picGrade.Print pupil.Name; Tab(28); pupil.SocSecNum(); _
  129.                  Tab(48); pupil.SemGrade
  130. End Sub
  131. Private Sub cmdQuit_Click()
  132.   End
  133. End Sub
  134.